<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="../css/index.css">
		<script src="../js/vue.min.js"></script>
		<script src="../js/vant.min.js"></script>
		<script src="html5plus://ready"></script>
		<script src="../js/ajax.js"></script>
		<script type="text/javascript">
			document.addEventListener('plusready', function() {
				setInterval(function (){
					plus.webview.currentWebview().reload(true);
				},10000)
			});
			</script>

	</head>
	<body>
		<div id="app">
			<van-row style="background-color: red;padding-top: 30px; ">
				<van-col span="5">
					<img  style="width: 80px; height:80px; margin-left: 50px;" v-model="imgUrl" :src="imgUrl"  />		
				</van-col>
			<van-col span="8">
			<van-icon size="36px" color="white" style="position: relative; left: 60%;" v-if="dis" >
					<span style="font-size: 24px;">{{name}}</span>
				</van-icon>
				<van-icon size="36px" color="white" style="position: relative;left: 60%;" v-else="dis">
					<span style="font-size: 24px;">{{name}}</span>
				</van-icon>
				</van-col>
			</van-row>
			<van-row class="user-links" style="text-align: center;margin-top: 15px;">
				<van-col span="6">
					<van-icon info="3" size="30px" name="shopping-cart-o" style="text-align: center;font-size: 17px;" />

				</van-col>

				<van-col span="6">
					<van-icon size="30px" name="records" style="text-align: center;font-size: 17px;" /><br />

				</van-col>
				<van-col span="6">
					<van-icon size="30px" name="chat-o" style="text-align: center;font-size: 17px;" /><br />

				</van-col>
				<van-col span="6">
					<van-icon size="30px" name="notes-o" style="text-align: center;font-size: 17px;" /><br />

				</van-col>
			</van-row>
			<van-row>
				<van-col span="6" offset="1"><span @click="fuk">待付款</span></van-col>
				<van-col span="6"><span @click="shouh">待收货</span></van-col>
				<van-col span="6"><span @click="pingl">待评论</span></van-col>
				<van-col span="5"><span @click="dingdan">我的订单</span></van-col>
			</van-row>

			<van-cell-group style="margin-top: 20px;">
				<van-cell icon="contact" @click="zl" title="个人资料" is-link></van-cell>
				<van-cell icon="location-o" @click="address" title="收货地址" is-link></van-cell>
				<van-cell icon="like-o" @click="shoucang" title="我的收藏" is-link></van-cell>
			</van-cell-group>

			<van-cell-group style="margin-top: 20px;" class="user-group">
				<van-cell icon="setting" @click="sz" title="设置" is-link></van-cell>
			</van-cell-group>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el: "#app",
				data: {
					imgUrl: localStorage.getItem("setas"),
					name: "未登录",
					pay: '',
					dis: true,
					tre:true
				},
				methods: {
					dingdan: function() {
						plus.webview.create("BMyOrder.html", "BMyOrder").show()
					},
					fuk: function() {
						plus.webview.create("BdfkOrder.html", "BdfkOrder").show()
					},
					shouh: function() {
						plus.webview.create("Bnew_file.html", "Bnew_file").show()
					},
					pingl: function() {
						plus.webview.create("BMyOrder1.html", "BMyOrder1").show()
					},
					shoucang: function() {
						plus.webview.create("BMyshouc.html", "BMyCollect").show()
					},
					address: function() {
						plus.webview.create("JAddress.html", "JAddress").show()
					},
					zl: function() {
						plus.webview.create("JProsein.html", "JProsein").show()
					},
					Login: function() {
						plus.webview.create("BPersonal .html", "BPersonal").show()
					},
					sz:function() {
						plus.webview.create("JAset up.html", "JAset").show()
					},
				},
					mounted: function() {
					_this = this;
					if (localStorage.getItem("key") != null) {
						_this.name = localStorage.getItem("NickName");
						_this.imgUrl = localStorage.getItem('imgUrl');	
						_this.dis = false;
						_this.tre=false;
						ajax({
							url: "http://dsapi.ysd3g.com/api/MyOrderList",
							dataType: "jsonp",
							data: {
								Key: localStorage.getItem("key")
							},
							"success": function(res) {
// 								 _this.pay = res.Data.length;
					}
						})
					}
				}
			})
		</script>
	</body>
</html>
